package com.zc.service;

import com.zc.pojo.Hobby;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

/**
 * @description:
 * @author: cong
 * @create: 2025/2/19
 */
@Service
public class HobbyService {
    @Cacheable(value = "hobby", key = "'hobby:' + #id", cacheManager = "cacheManager")
    public Hobby getHobby(Integer id) {
        return Hobby.builder().id(id).hobbyName("打游戏").build();
    }
}
